﻿<%@ Control Language="C#" %>
<%@ Register Src="Product-List.ascx" TagName="list" TagPrefix="Product" %>
<%@ Register Src="Types-DBColumn-List-a.ascx" TagName="list" TagPrefix="Subnavbar" %>
<%@ Register Src="~/module/Advertisement-Home.ascx" TagName="list" TagPrefix="AD" %>
<script runat="server">
    private int cid = 0;
    private int item_lang = 1;
    private int top_size = 6;
    private int ad_top_size = 3;
    /// <summary>
    /// 栏目信息集
    /// </summary>
    public Types RootColumn = new Types();
    protected void Page_Load(object sender, EventArgs e)
    {
        /* 如果栏目ID未绑定，尝试地址栏获取ID */
        if (Cid == 0)
            Cid = Utils.GetQueryString("cid", 0);
        /* 绑定栏目相关信息集 */
        if (Cid != 0)
            RootColumn = new Types(Cid);
        /* 如果语言ID未绑定，尝试地址栏获取  */
        item_lang = Utils.GetQueryString("lang", 1);

        /* 页面组件绑定 */
        subnavbar.Root_Id = Cid;
        Ad.Cid = Cid;
        products.Cid = Cid;
        products.S_Mode = S_Mode;

    }
    /// <summary>
    /// 产品分类ROOT_ID
    /// </summary>
    public int Cid
    {
        get { return cid; }
        set { cid = value; }
    }
    /// <summary>
    /// 显示数量
    /// </summary>
    public int Top_Size
    {
        get { return top_size; }
        set { top_size = value; }
    }
    /// <summary>
    /// 图片后缀标签
    /// </summary>
    private string S_mode = "";
    public string S_Mode
    {
        get { return S_mode; }
        set { S_mode = value; }
    }
</script>
<!-- 一个整体产品框架加载 -->
<div class="product-column column_number_<%=Cid %>">
    <div class="column_header">
        <h3>
            <a href="product-list.aspx?cid=<%=Cid %>">
                <span><%=RootColumn.Name %></span>
                <em><%=Lang.Show("More") %></em>
            </a>
        </h3>
        <div class="subnavbar">
            <Subnavbar:list Type="2" KeepUrl="product-list.aspx?" runat="server" ID="subnavbar" />
        </div>
    </div>
    <div class="content_inner">
        <div class="right">
            <AD:list runat="server" ID="Ad" />
        </div>
        <div class="left">
            <Product:list runat="server" ID="products" />
        </div>
    </div>
</div>
